package com.hq.zb.model;

import com.alibaba.fastjson.annotation.JSONField;
import com.alibaba.fastjson.serializer.ToStringSerializer;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * <p>
 * 数据字典头表
 * </p>
 *
 * @author huanghanrui
 * @since 2022-03-09
 */
@Data
@TableName("sys_code")
public class Code extends BaseModel<Code> {

    private static final long serialVersionUID = 1L;

    /**
     * 数据字典id
     */
    @TableId(value = "code_id", type = IdType.AUTO)
    private Integer codeId;
    /**
     * 编码
     */
    private String code;
    /**
     * 部门名称
     */
    private String name;
    /**
     * 部门名称
     */
    private String description;
    /**
     * 启用Y/N
     */
    @TableField("enable_flag")
    private Boolean enableFlag;
    /**
     * 是否开发者：Y：是不对用户公开，N：对用户公开
     */
    @TableField("is_developer")
    private String isDeveloper;

    @TableField(exist = false)
    private List<CodeLine> codeLineList;

    @Override
    protected Serializable pkVal() {
        return this.codeId;
    }
}
